<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>职位搜索</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="Hosting Store Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>

    <%--<link href="${pageContext.request.contextPath}/static/admin/assets/css/minimal.css" rel="stylesheet"/>--%>
    <link href="${pageContext.request.contextPath}/static/home/css/bootstrap.css" rel='stylesheet' type='text/css' />

    <script src="${pageContext.request.contextPath}/static/home/js/jquery-1.11.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/bootstrap/bootstrap.min.js"></script>
    <!-- Custom Theme files -->
    <link href="${pageContext.request.contextPath}/static/home/css/style.css" rel='stylesheet' type='text/css' />
    <!-- Custom Theme files -->

    <!-- webfonts -->
    <link href='${pageContext.request.contextPath}/static/home/css/font-awesome.css' rel='stylesheet' type='text/css'/>
    <!-- webfonts -->
    <!-- dropdown -->
    <script src="${pageContext.request.contextPath}/static/home/js/jquery.easydropdown.js"></script>

    <link href="${pageContext.request.contextPath}/static/home/css/nav.css" rel="stylesheet" type="text/css" media="all"/>
    <link href="${pageContext.request.contextPath}/static/admin/css/sweetalert.css" rel="stylesheet">

    <link href="${pageContext.request.contextPath}/static/home/css/job_search_css.css" rel='stylesheet' type='text/css' />
    <!-- start-smoth-scrolling -->
    <script src="${pageContext.request.contextPath}/static/admin/js/sweetalert.min.js"></script>
    <!-- start-smoth-scrolling -->
    <!-- webfonts -->
    <%--<link href='http://fonts.useso.com/css?family=Ubuntu:300,400,500,700' rel='stylesheet' type='text/css'>--%>
    <!-- webfonts -->
    <!-- start-smoth-scrolling -->
    <link href="${pageContext.request.contextPath}/static/admin/assets/css/vendor/bootstrap/bootstrap.min.css" rel="stylesheet"/>

    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/home/css/bootstrap-checkbox.css">
    <link href="${pageContext.request.contextPath}/static/home/css/job_management_table.css" rel="stylesheet">
    <style>

    </style>
</head>
<!-- Header Starts Here -->
<div class="banner inner-banner" >
    <%@include file="../header.jsp"%>

    <div id="breadcrumb_wrapper">
        <div class="container">

            <h3><strong>职位搜索</strong></h3>
            <h6>&nbsp;</h6>

            <div class="clearfix"></div>
        </div>
    </div>
</div>
<div class="clearfix"> </div>
<!-- Header Ends Here -->

<!--Main Starts Here-->
<div class="container">
    <form action="${pageContext.request.contextPath}/home/job/searchJob.action" method="post">
        <div class="search">
            <p><br><br></p>
            <div class="search_bar">
                <input name="search_name" type="text" placeholder="想应聘的公司名称或者职位名称">
                <div class="clearfix"></div>
            </div>
            <p><br><br></p>
            <span style="margin-left: 11em; color: #1BBC9B;">高级搜索设置</span>
            <p><br></p>
            <div class="advanced">
                <div class="advanced_row">
                    <select name="industry_id" style="width: 49%;">
                        <option value="0" selected>期望工作类型</option>
                        <c:forEach items="${industryList}" var="item">
                            <option value="${item.industry_id}">${item.industry_name}</option>
                        </c:forEach>
                    </select>
                    <select name="job_property_id" style="width: 49%;">
                        <option value="0" selected>招聘类型</option>
                        <c:forEach items="${jobPropertyList}" var="item">
                            <option value="${item.job_property_id}">${item.job_property_name}</option>
                        </c:forEach>
                    </select>
                    <div class="clearfix"></div>
                </div>
                <div class="advanced_row">
                    <select id="zone" style="width: 49%;" onchange="changeCity('zone','city')">
                        <option value="0" selected>省份</option>
                        <c:forEach items="${zoneList}" var="item">
                            <option value="${item.zone_id}">${item.name}</option>
                        </c:forEach>
                    </select>
                    <select id="city" name="city_id" style="width: 49%;">
                        <option value="0">城市</option>
                    </select>
                    <div class="clearfix"></div>
                </div>
                <div class="advanced_row">
                    <select name="salary_type_id" style="width: 49%;">
                        <option value="0">期望薪资</option>
                        <c:forEach items="${salaryTypeList}" var="item">
                            <option value="${item.salary_type_id}">${item.value}</option>
                        </c:forEach>
                    </select>
                    <select name="degree_id" style="width: 49%;">
                        <option value="0" >学历要求</option>
                        <c:forEach items="${degreeList}" var="item">
                            <option value="${item.degree_id}">${item.degree_name}</option>
                        </c:forEach>
                    </select>
                    <div class="clearfix"></div>
                </div>
                <div class="advanced_row">
                    <input type="submit" class="search_button" value="找工作">
                    <div class="clearfix"></div>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </form>

</div>

<!-- #Footer -->
<%@include file="../footer.jsp"%>
<!-- /#Footer -->
<!-- here stars scrolling icon -->
<script type="text/javascript" src="${pageContext.request.contextPath}/static/home/js/move-top.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/home/js/easing.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/home/js/moment.min.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/js/page.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/home/js/daterangepicker-1.3.7.js"></script>
<script type="text/javascript">
    jQuery(document).ready(function($) {
        $(".scroll").click(function(event){
            event.preventDefault();
            $('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
        });
    });
</script>
<!-- /#Footer -->
<!-- here stars scrolling icon -->
<script type="text/javascript">
    $(document).ready(function() {
        /*
         var defaults = {
         containerID: 'toTop', // fading element id
         containerHoverID: 'toTopHover', // fading element hover id
         scrollSpeed: 1200,
         easingType: 'linear'
         };
         */

        $().UItoTop({ easingType: 'easeOutQuart' });

    });
</script>

<!-- //here ends scrolling icon -->

<script>
    changeCity('zone','city');
    function changeCity(id1,id2){
        var zone_id = $('#'+id1).val();
        console.log(zone_id);
        if (zone_id != 0) {
            $.ajax({
                type:'post',
                url:'${pageContext.request.contextPath}/home/resume/getCityList.action',
                data: 'zone_id='+ zone_id,
                success:function(data){
                    var string="";
                    //console.log(data);
                    string += '<option value="0">城市</option>';
                    for(var i in data){
                        string += '<option value="'+data[i].city_id+'">'+data[i].name+'</option>';
                    }
                    $('#'+id2).html(string);
                    $('#'+id2).trigger("chosen:updated");
                }
            })
        }else {
            var string="";
            string += '<option value="0">城市</option>';
            $('#'+id2).html(string);
            $('#'+id2).trigger("chosen:updated");
        }
    }

    <c:if test="${error==1}">
        swal("","暂无符合要求的职位!","error");
    </c:if>
</script>
</body>
</html>
